﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Gozib.Web.Models.Bus;
using System.Web;

namespace Gozib.Web.Api
{
    public class CityApiController : ApiController
    {
        // GET api/busapi
        public HttpResponseMessage Get()
        {
            return Get("");
        }

        // GET api/busapi/5
        public HttpResponseMessage Get(string term)
        {
            //TODO : Search Terms

            return Request.CreateResponse<IEnumerable<CityResultModel>>(HttpStatusCode.OK, DummyDataRespository.GetCities(term));
        }

        // POST api/busapi
        public void Post([FromBody]string value)
        {
        }

        // PUT api/busapi/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/busapi/5
        public void Delete(int id)
        {
        }
    }
}
